import { request } from "@/utils/request";

const basePrefix = '/ht-smart-house'

/**
 * 获取用户消息条数
 * @returns {Promise | Promise<unknown>}
 */
export const getUserMsgTotalApi = () => {
    return request({
        url: `${basePrefix}/homePrototypeRoom/getHomePrototypeRoomCount`,
        method: 'GET'
    })
}

/**
 * 获取节假日信息
 * @param year 当前年份
 * @returns {Promise | Promise<unknown>}
 */
export const getHolidaysDateApi = year => {
    return request({
        url: `${basePrefix}/subscribeHouse/getHolidayDay`,
        method: 'POST',
        type: 'application/x-www-form-urlencoded',
        data: { year }
    })
}

export const getDisabledTimesApi = () => {
    return request({
        url: `${basePrefix}/subscribeHouse/getNotSubscribeTime`,
        method: 'POST'
    })
}
